<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<link rel="stylesheet" type="text/css" href="/skin/css/amazeui.min1.css" />
<link href="/user/css/style.css" rel="stylesheet" type="text/css" />
<script src="/user/js/jquery.js"></script>
<script src="/skin/js/toast.js"></script>
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<title>编辑银行卡-会员中心</title>
<style>
	/* 设计稿 375px，1rem = 100px，换算方法：px值 ÷ 100 = rem值 */
	a{-webkit-tap-highlight-color:transparent;outline:none;}
	body{background:#f3f5f8;}
	
	/* 页面容器 */
	.edit-container{
		padding:0.16rem;
	}
	
	/* 表单卡片 */
	.form-card{
		background:#fff;
		border-radius:0.12rem;
		padding:0.24rem;
		box-shadow:0 0.02rem 0.08rem rgba(0,0,0,0.04);
		margin-bottom:0.16rem;
	}
	
	/* 表单项 */
	.form-item{
		margin-bottom:0.2rem;
	}
	.form-item:last-child{
		margin-bottom:0;
	}
	
	.form-label{
		font-size:0.14rem;
		color:#64748b;
		margin-bottom:0.08rem;
		font-weight:500;
	}
	
	.form-control{}
	
	.form-control input{
		width:100%;
		height:0.44rem;
		border:0.01rem solid #e5e7eb;
		border-radius:0.08rem;
		padding:0 0.12rem;
		font-size:0.14rem;
		outline:none;
		box-sizing:border-box;
		background:#fff;
	}
	.form-control input:focus{
		border-color:#253043;
	}
	.form-control input::placeholder{
		color:#94a3b8;
	}
	
	/* 按钮 */
	.page-actions{
		margin-top:0.24rem;
	}
	
	.primary-btn{
		width:100%;
		height:0.48rem;
		background:#253043;
		color:#fff;
		border:none;
		border-radius:0.04rem;
		font-size:0.16rem;
		font-weight:700;
		cursor:pointer;
		-webkit-tap-highlight-color:transparent;
	}
	.primary-btn:active{
		opacity:0.8;
	}
</style>
<script>
	// 设计稿 375px，1rem = 100px，换算方法：px值 ÷ 100 = rem值
	(function(){
		var docEl = document.documentElement;
		var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
		function recalc() {
			var clientWidth = docEl.clientWidth;
			if (!clientWidth) return;
			docEl.style.fontSize = (clientWidth / 375 * 100) + 'px';
		}
		if (!document.addEventListener) return;
		window.addEventListener(resizeEvt, recalc, false);
		document.addEventListener('DOMContentLoaded', recalc, false);
		recalc();
	})();
</script>
</head>
<body class="body">
<div class="main">
	<header id="header">
		<section class="head-b head-b1">
			<span class="u-left"><a href="javascript:history.go(-1);" class="back"><img src="/skin/img/back.png"/></a></span>
			<h1 id="t0">编辑银行卡</h1>
			<div class="u-right">
				<a href="/" class="hSearch right"><img src="/skin/img/i_home.png"/></a>
			</div>
		</section>
	</header>
	
	<div class="edit-container">
		<form class="xx">
			<input type="hidden" value="{$binfo[Id]}" name='id' />
			
			<div class="form-card">
				<div class="form-item">
					<div class="form-label">开户行</div>
					<div class="form-control">
						<input type="text" name="t1" placeholder="请填写开户银行" value="{$binfo[bankname]}" />
					</div>
				</div>
				
				<div class="form-item">
					<div class="form-label">银行卡号</div>
					<div class="form-control">
						<input type="text" name="t2" placeholder="请填写银行卡号" value="{$binfo[bankcard]}" />
					</div>
				</div>
				
				<div class="form-item">
					<div class="form-label">持卡人姓名</div>
					<div class="form-control">
						<input type="text" name="t3" placeholder="请填写持卡人姓名" value="{$binfo[truename]}" />
					</div>
				</div>
				<div class="form-item">
					<div class="form-label">身份证号</div>
					<div class="form-control">
						<input type="text" name="t4" placeholder="请填写持卡人身份证号" value="{$binfo[idcard]}" />
					</div>
				</div>
			</div>
			
			<div class="page-actions">
				<button class="primary-btn" type="button" onclick="edit();">确认修改</button>
			</div>
		</form>
	</div>
</div>

<script>
function edit(){
	$.ajax({
		type:"post",
		dataType:"json",
		url:"/Moudelu.php?m=m&a=bank_edit",
		data:$(".xx").serialize(),
		success:function(d){
			if(d[0]==2){
				window.location.href='login.php';
				return false;
			}
			if(d[0]==0){
				showToast(d[1],'error');
			}
			else{
				showToast(d[1],'success');
				window.location.href='/user/bank.php';
			}
		}
	});
}
</script>
{include(foot)}
</body>
</html>
